#########################################################################
## titanCNA
## 合并癌和癌旁的样本
export work_dir=~/20220915_gastric_multiple/dna_batch_raw
export Titan_path=${work_dir}/results/titan

export Titan_Combine_path=${work_dir}/results/titanCombine

mkdir -p ${Titan_Combine_path}

#########################################################################
rm -rf ${Titan_Combine_path}/FinalModel
mkdir -p ${Titan_Combine_path}/FinalModel

cp -rf ${work_dir}/results/titan/FinalModel/* ${Titan_Combine_path}/FinalModel/
cp -rf ${work_dir}/results/titan/FinalModel_NonTumor/* ${Titan_Combine_path}/FinalModel/


cat ${work_dir}/results/titan/Purity_titan.final.tsv > ${Titan_Combine_path}/Purity_titan.final.tsv
cat ${work_dir}/results/titan/Purity_titan.final.NonTumor.tsv | grep -v Purity >> ${Titan_Combine_path}/Purity_titan.final.tsv

cat ${work_dir}/results/titan/Titan_all_seg.final.tsv > ${Titan_Combine_path}/Titan_all_seg.final.tsv
cat ${work_dir}/results/titan/Titan_all_seg.final.NonTumor.tsv | grep -v Sample >> ${Titan_Combine_path}/Titan_all_seg.final.tsv
